#include<stdio.h>
#include <unistd.h>

int main()
{

  /*
  printf("pid:%d,ppid:%d\n",getpid(),getppid());

  pid_t ret = fork();
  if(ret<0)
  {
    perror("fork");
  }
  else if(ret==0)
  {
   while(1)
   {
    printf("child  pid:%d,ppid:%d\n",getpid(),getppid());
    sleep(1);
   }
  }
  else{
    while(1){
    printf("parent   pid:%d,ppid:%d\n",getpid(),getppid());
    sleep(1);
     }
  }


  return 0;

  */

  printf("1  pid:%d,ppid%d\n",getpid(),getppid());
  fork();
  printf("2  pid:%d,ppid%d\n",getpid(),getppid());
  fork();
	printf("3  pid:%d,ppid%d\n",getpid(),getppid());




}
